#pragma once

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "esp_wifi.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "freertos/FreeRTOS.h"
#include "freertos/event_groups.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "freertos/queue.h"
#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#include "esp_log.h"
#include "mqtt_client.h"
#include "os.h"

//MQTT连接参数 
#define   Aliyun_host       "a16NqYWAjxg.iot-as-mqtt.cn-shanghai.aliyuncs.com"
#define   Aliyun_port       1883
#define   Aliyun_client_id  "a16NqYWAjxg.ESP32-TEST|securemode=2,signmethod=hmacsha256,timestamp=1662126675786|"
#define   Aliyun_username   "ESP32-TEST&a16NqYWAjxg"
#define   Aliyun_password   "da53a36becabb9c6fd125e55e1a7da7e08b7903907c9a8489a443ecb6407c7cd",

#define   MQTT_USER_COMMAND    "/a16NqYWAjxg/ESP32-TEST/user/Command"
#define   MQTT_DEVICE_DATA    "/a16NqYWAjxg/ESP32-TEST/user/Update"


extern esp_mqtt_client_handle_t client;

extern char out_set_flag;

extern int timemsg[5];
extern char msg[8];


void Received_Command_Process(char *receive_data);
void user_mqtt_app_start(void);

#ifdef __cplusplus
}
#endif

